package com.zui.webapp.action;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.zui.entity.product.Image;
import com.zui.manager.ImageManager;

public class ImageAction extends BaseJQGridAction {

	private static final long serialVersionUID = 1L;
	private static final Log log = LogFactory.getLog(ImageAction.class);
	
	private Image image;
	private List<Image> list;
	public ImageAction() {}
	public ImageAction(ImageManager imageManager) {
		this.imageManager = imageManager;
	}
	private ImageManager imageManager;
	public void setImageManager(ImageManager imageManager) {
		this.imageManager = imageManager;
	}
	
	/***********************************************************
	 * Business Method start
	 **********************************************************/
	
	public String deleteImage() {
		imageManager.deleteImage(image);
		valid = true;
		return "imageDeleted";
	}
	

	/***********************************************************
	 * getters and setters
	 **********************************************************/
	/**
	 * @return the userList
	 */
	public List<Image> getlist() {
		return list;
	}
	/**
	 * @param userList the userList to set
	 */
	public void setList(List<Image> list) {
		this.list = list;
	}
	/**
	 * @return the image
	 */
	public Image getImage() {
		return image;
	}
	/**
	 * @return the list
	 */
	public List<Image> getList() {
		return list;
	}
	/**
	 * @param image the image to set
	 */
	public void setImage(Image image) {
		this.image = image;
	}
	
}
